package com.mg.flightplan.utils;

import java.text.DecimalFormat;

public class TimeConverter {


	private String result=null;
	public TimeConverter() {
	}
	public TimeConverter(int ipt){
		convert(ipt);
	}
	
	private void convert(int ipt){
		
		int min = ipt/60;
		int seconds = ipt - min * 60;
		DecimalFormat dec = new DecimalFormat("00");
		result = min+":"+ dec.format(seconds);
	}

	public String toString(int ipt){
		convert(ipt);
		return result;
	}
	
	public String toString(){
		return result;
	}

}
